package com.jiuyun.service.impl;

import com.jiuyun.dao.UserDao;
import com.jiuyun.entity.Users;
import com.jiuyun.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;
    @Override
    public List getAll() {
        System.out.println("运行gatall代码...");
        return userDao.getAll();
    }

    @Override
    public int add(Users user) {
        System.out.println("运行add代码...");
        int n=userDao.add(user);
        return n;
    }

    @Override
    public int del(int userid) {
        System.out.println("运行del代码...");
        int n=userDao.del(userid);
        return n;
    }

    @Override
    public int update(Users users) {
        System.out.println("运行update代码...");
        int n=userDao.update(users);

        return n;
    }
}
